Skip to content

ReactiveList.Insert(int, T) method

Defined in

Type: ReactiveList Namespace: ReactiveList.Reactive.Collections Assembly: ReactiveList.Reactive.dll

Applies to

net11.0, net10.0, net47, net471, net472, net48, net481

Overloads

  1. public void Insert(int index, T item)

  2. public void Insert(int index, object? value)

1. Overload

public void Insert(int index, T item)

View source (opens in a new tab)

Inherited documentation

These docs were inherited from IList<T>. The member doesn't override them on this type.

Summary: Inserts an item to the IList (opens in a new tab) at the specified index.

Parameters

NameTypeDescription
indexint (opens in a new tab)The zero-based index at which item should be inserted.
itemTThe object to insert into the IList (opens in a new tab).

Exceptions

TypeCondition
System.ArgumentOutOfRangeException (opens in a new tab)Thrown when index is negative or greater than Count.
System.NotSupportedException (opens in a new tab)The IList (opens in a new tab) is read-only.

2. Overload

public void Insert(int index, object? value)

View source (opens in a new tab)

Inherited documentation

These docs were inherited from IList. The member doesn't override them on this type.

Summary: Inserts an item to the IList (opens in a new tab) at the specified index.

Parameters

NameTypeDescription
indexint (opens in a new tab)The zero-based index at which value should be inserted.
valueobject? (opens in a new tab)The object to insert into the IList (opens in a new tab).

Exceptions

TypeCondition
System.ArgumentOutOfRangeException (opens in a new tab)index is not a valid index in the IList (opens in a new tab).
System.NotSupportedException (opens in a new tab)The IList (opens in a new tab) is read-only. -or- The IList (opens in a new tab) has a fixed size.
System.NullReferenceException (opens in a new tab)value is null reference in the IList (opens in a new tab).